package com.mcu32.bright.config;


import lombok.Data;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
public class OneNetProperties {

    private DeviceManagement deviceManagement = new DeviceManagement();
    private ApplicationDevelopment applicationDevelopment = new ApplicationDevelopment();
    private CommonInfo commonInfo = new CommonInfo();


    /**
     * 公共信息
     */
    @Data
    public static class CommonInfo {
        private String url = "http://openapi.heclouds.com/namespace?action=xxxx&version=1";
        private String projectId = "sHnKlV";
        private String productId = "2SyzYvKRpK";

        public String getUrl() {
            return url;
        }

        public String getProjectId() {
            return projectId;
        }

        public String getProductId() {
            return productId;
        }
    }

    /**
     * 设备管理类
     */
    @Data
    public static class DeviceManagement {
        private String nameSpace = "common";
        private String createDeviceAction = "CreateDevice";

        public String getNameSpace() {
            return nameSpace;
        }

        public String getCreateDeviceAction() {
            return createDeviceAction;
        }
    }

    /**
     * 应用开发类
     */
    @Data
    public static class ApplicationDevelopment {
        private String nameSpace = "application";
        private String queryDevicePropertyAction = "QueryDeviceProperty";
        private String setDevicePropertyAction = "SetDeviceProperty";

        public String getNameSpace() {
            return nameSpace;
        }

        public String getQueryDevicePropertyAction() {
            return queryDevicePropertyAction;
        }

        public String getSetDevicePropertyAction() {
            return setDevicePropertyAction;
        }
    }


}
